<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改商户业务渠道关系')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-merbusicha-edit" th:object="${hzMerBusiChaR}">
            <input name="rId" th:field="*{rId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">商户号：</label>
                <div class="col-sm-8">
                    <input name="merchantId" th:field="*{merchantId}" class="form-control" type="text" readonly >
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">商户简称：</label>
                <div class="col-sm-8">
                    <input name="extend_merchantName" th:field="*{extend_merchantName}" class="form-control" type="text" disabled>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">业务：</label>
                <div class="col-sm-8">
                    <select id="busiId" name="busiId" class="form-control">
                        <option th:each="busi : ${busiList}" th:selected="${busi.id} == *{busiId}" th:value="${busi.id}" th:text="${busi.name}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">渠道：</label>
                <div class="col-sm-8">
                    <select id="channelId" name="channelId" class="form-control">
                        <option th:each="channel : ${channelList}" th:selected="${channel.channelId} == *{channelId}" th:value="${channel.channelId}" th:text="${channel.channelName}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">启用状态：</label>
                <div class="col-sm-8">
                    <select th:field="*{status}" th:value="*{status}" name="status" class="form-control">
                        <option th:selected="*{status==1}" value="1">启用</option>
                        <option th:selected="*{status==2}" value="2">暂停</option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "mng/merbusicha";
        $("#form-merbusicha-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-merbusicha-edit').serialize());
            }
        }
    </script>
</body>
</html>